package chpt10;

import java.awt.event.MouseWheelListener;

import javax.swing.JOptionPane;

public class Test {

	@SuppressWarnings("unused")
	public static void main(String[] args) {
		// 消息框
		JOptionPane.showMessageDialog(null, "显示一些消息");
		// 确认框
		int result = JOptionPane.showConfirmDialog(null, "你确定？", "确认框", JOptionPane.YES_NO_OPTION);
		// 输入框
		String input = JOptionPane.showInputDialog(null, "请输入你的答案:");
		// 选项框
		Object[] options = { "A", "B", "C" };
		result = JOptionPane.showOptionDialog(null, "你要选择哪项:", "选项对话框", JOptionPane.DEFAULT_OPTION,
		                JOptionPane.QUESTION_MESSAGE, null, options, options[0]);

	}

}
